package com.z8888q.zlottery.sensorswork;

import com.z8888q.zlottery.Zlottery;

public class DataWork{
	Zlottery zl;
	int screenHeight , screenWidth;
	int directionX=1 , directionY=1;
	int deltaX = 0;
	int deltaY = 0;
	boolean isXChanged=false;
	float temp=0;
	
	public DataWork(Zlottery zl){
		this.zl=zl;	
		screenHeight=zl.screenHeight;
		screenWidth=zl.screenWidth;
	}
	
	public void DoDataWork(float x,float y,float z){

			if(Math.sqrt(x*x+y*y+z*z)<8||Math.sqrt(x*x+y*y+z*z)>12)
			{
				temp=zl.XChangeTemp;
				if(temp-x>20){
					zl.doYao();
					
					zl.XChangeTemp=0;
				}
				if(x>zl.XChangeTemp)zl.XChangeTemp=x;
			}	
	}	
}
